import { CreateDate, UpdateDate, Entity, Price, Digdit, Cover, PrimaryUuid, ShopGoodOptionType, ShopOrderId, ShopGoodId, Title, Image, Uuid, Code } from '@sker/core'
@Entity({ name: 'shop_order_good' })
export class ShopOrderGood {
    static title: string = `订单商品`;
    static resource: string = `shop_order_good`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_SHOP_ORDER_GOOD"
    })
    id!: string;

    @ShopOrderId({ comment: '订单 ID' })
    order_id!: string;

    @ShopGoodId({ comment: '商品 ID' })
    good_id!: string;

    @Code({ length: '60', comment: '规格 ID', nullable: true })
    option_id!: string;

    @Title({ comment: '规格名称', nullable: true, default: '' })
    option_title!: string;

    @Title({ comment: '商品名称' })
    title!: string;

    @Cover({ comment: '缩略图' })
    cover!: string;

    @ShopGoodOptionType({ comment: '类型' })
    type!: string;

    @Code({ comment: '状态', default: '' })
    status: string;

    @Price({ comment: '商品单价' })
    price!: number;

    @Digdit({ comment: '购买数量' })
    total!: number;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;

    @Code()
    postage_id: string;
}